package com.example.demo.mapper;

import com.example.demo.po.Student;
import com.example.demo.po.Teacher;
import com.example.demo.po.dto.StudentAddParam;
import com.example.demo.po.dto.StudentParam;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface StudentMap {

    void SaveStudentByAdd(StudentAddParam student);

    Student SaveStudent(Student student);
    void DeleteStudent(int id);
    void UpdateStudent(StudentParam student);
    List<Student> GetStudentList();
    List<Student> SearchStudent(String name);

    List<Student>  GetStudentByNameAndId(String name,int id);


    List<Student>  GetStudentByName(String name);


    List<Student> GetStudentById(int id);



    int GetUserId(int id);

    void DeleteByUserId(int id);
    StudentParam GetStudentByUserId(int userid);
}
